package com.jwell.panprovider.contract

import com.jwell.cargoapp.ui.base.IBaseView
import com.jwell.driverapp.tools.BaseSubscriber
import com.jwell.panprovider.entity.AppCocntractDetailDto
import com.jwell.panprovider.entity.ValMsgDto
import com.jwell.panprovider.model.ProviderRegisterModel

/**
 * Created by 76577 on 2018/4/22.
 * 供应预登记
 */
class ProviderRegisterContract {
    interface View : IBaseView {

        fun setDetail(data: AppCocntractDetailDto)

        fun registerSuccess()

        //验证车牌，根据状态提示
        fun showCheckCarNum(data: ValMsgDto)

        //验证司机，根据状态提示
        fun showCheckDriverPhone(isNew: Boolean, phone: String, name: String?)
    }

    interface Presenter {
        //获取详情
        fun appGetContractDetail(data: ProviderRegisterModel.Detail)

        //供应登记
        fun appSupplyRegistration(data: ProviderRegisterModel.RequestData)

        //验证车牌
        fun checkCarNum(id: String)

        //验证司机
        fun checkDriverPhone(id: String, name: String?)
    }

    interface Model {
        //获取详情
        fun appGetContractDetail(data: ProviderRegisterModel.Detail, baseSubscriber: BaseSubscriber)

        //供应登记
        fun appSupplyRegistration(data: ProviderRegisterModel.RequestData, baseSubscriber: BaseSubscriber)

        //验证车牌
        fun checkCarNum(id: String, baseSubscriber: BaseSubscriber)

        //验证司机
        fun checkDriverPhone(id: String, baseSubscriber: BaseSubscriber)
    }
}